GATE CSE 2021 SET-1
Q21.
In the context of operating systems, which of the following statements is/are correct with respect to paging?[MSQ]Q22.
Consider the following matrix.\begin{pmatrix} 0 & 1 & 1 & 1\\ 1& 0& 1 & 1\\ 1& 1 & 0 & 1 \\1 & 1 & 1 & 0 \end{pmatrix}The largest eigenvalue of the above matrix is __________.Q23.
Consider the following undirected graph with edge weights as shown:The number of minimum-weight spanning trees of the graph is __________Q24.
Consider the following language: L= \{ w \in \{0,1\}^* \mid w \text{ ends with the substring } 011 \} Which one of the following deterministic finite automata accepts L?Q25.
Let the representation of a number in base 3 be 210. What is the hexadecimal representation of the number?Q26.
Consider the following representation of a number in IEEE 754 single-precision floating point format with a bias of 127. S:1E:10000001F:11110000000000000000000 Here, S,E and F denote the sign, exponent, and fraction components of the floating point representation. The decimal value corresponding to the above representation (rounded to 2 decimal places) is ____________.Q27.
Consider the following instruction sequence where registers R_1,R_2 \text{ and }R_3 are general purpose and MEMORY[X] denotes the content at the memory location X.\begin{array}{llc} \textbf{Instruction} & \textbf{Semantics} & \textbf{Instruction Size} \text{ (bytes)} \\ \hline \text{MOV } R1, (5000) & R1 \leftarrow \text{MEMORY}[5000] & 4 \\ \hline \text{MOV } R2, (R3) & R2 \leftarrow \text{MEMORY}[R3] & 4 \\ \hline \text{ADD} R2, R1 & R2 \leftarrow R1 + R2 & 2 \\ \hline \text{MOV } (R3), R2 & \text{MEMORY}[R3] \leftarrow R2 & 4 \\ \hline \text{INC } R3 & R3 \leftarrow R3+1 & 2 \\ \hline \text{DEC } R1 & R1 \leftarrow R1-1 & 2 \\ \hline \text{BNZ } 1004 & \text{Branch if not zero to the} & 2 \\ & \text{given absolute address} \\ \hline \text{HALT} & \text{Stop} & 1 \\ \hline \end{array} Assume that the content of the memory location 5000 is 10, and the content of the register R_3 is 3000. The content of each of the memory locations from 3000 to 3020 is 50. The instruction sequence starts from the memory location 1000. All the numbers are in decimal format. Assume that the memory is byte addressable. After the execution of the program, the content of memory location 3010 is ____________Q28.
Consider the following C code segment:a = b + c; e = a + 1; d = b + c; f = d + 1; g = e + f;In a compiler, this code segment is represented internally as a directed acyclic graph (DAG). The number of nodes in the DAG is _____________Q29.
Consider the following statements. S1: Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1). S2: For any context-free grammar, there is a parser that takes at most O(n^3) time to parse a string of length n. Which one of the following options is correct?Q30.
A five-stage pipeline has stage delays of 150, 120, 150, 160 and 140 nanoseconds. The registers that are used between the pipeline stages have a delay of 5 nanoseconds each.The total time to execute 100 independent instructions on this pipeline, assuming there are no pipeline stalls, is _______ nanoseconds.